function Graph(){};
Graph.prototype.drawCircle = function(x,y,r,style){
	return '<circle cx="'+x+'" cy="'+y+'" r="'+r+'"  style="'+style+'"/>';
}
Graph.prototype.drawCircle = function(x,y,r,style){
	return '<circle cx="'+x+'" cy="'+y+'" r="'+r+'"  style="'+style+'"/>';
}
Graph.prototype.drawEllipse = function(cx,cy,rx,ry,style){
	return '<ellipse cx="'+cx+'" cy="'+cy+'" rx="'+rx+'" ry="'+ry+'"  style="'+style+'"/>';
}
Graph.prototype.drawPath = function(arr,style){
	var d = '',brak = false;
	for (var i=0;i<arr.length;i++) {
		var it = arr[i];
		if(it){
			var m = it.name;
			var list = it.list;
			switch (m){
				case 'M':
				case 'L':
					d+=m+list[0]+' '+list[1]+' ';
					break;
				case 'H':
				case 'V':
					d+=m+list[0]+' ';
					break;
				case 'S':
				case 'Q':
				case 'T':
					d+=m+list[0]+' '+list[1]+', '+list[2]+' '+list[3]+' ';
					break;
				case 'C':
					d+=m+list[0]+' '+list[1]+', '+list[2]+' '+list[3]+', '+list[4]+' '+list[5]+' ';
					break;
				case 'Z':
					d+=m;
					brak = true;
					break;
				default:
					break;
			}
		}
		if(brak){break;}
	}
	return '<path d="'+d+'"/>';
}
var graph = new Graph();

